package day12.demo2;

/**
 * @Auther:小陈的Java
 */
public class ThreadDemo1 extends Thread{
    @Override
    public void run() {
        for (int i = 0;i<=1000;i++){
            System.out.println(i);
        }
    }

    public static void main(String[] args) throws Exception{
        ThreadDemo1 threadDemo1 = new ThreadDemo1();
        System.out.println(threadDemo1.getState());
        threadDemo1.start();
        System.out.println(threadDemo1.getState());
        Thread.sleep(1000);
        System.out.println(threadDemo1.getState());
    }
}
